package com.ruoyi.web.convert.area;

import com.ruoyi.basedata.domain.DwAreas;
import com.ruoyi.web.entity.Area;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 系统报错 Convert
 *
 * @author 芋道源码
 */
@Mapper
public interface AreaConvert {

    AreaConvert INSTANCE = Mappers.getMapper(AreaConvert.class);
    @Mapping(source = "ID", target = "Id")
    @Mapping(source = "parentId", target = "ParentID")
    @Mapping(source = "areaCode", target = "CustomCode")
    @Mapping(source = "areaName", target = "AreaName")
    Area convert(DwAreas bean);

    @Mapping(source = "fquipmentId", target = "equipmentId")
    List<Area> convert(List<DwAreas> bean);

}
